package com.feng.sharedingjdbc.service;

import com.feng.sharedingjdbc.model.OrderEntity;

import java.util.Optional;

/**
 * @author yinglong.zhang
 * @description
 * @date 2024-1-29 13:56
 */
public interface OrderService {

    /**
     * insert
     *
     * @param orderEntity a Order object
     * @return
     */
    OrderEntity insert(OrderEntity orderEntity);

    /**
     * update
     *
     * @param orderEntity a Order object
     * @return
     */
    OrderEntity update(OrderEntity orderEntity);

    /**
     * query by id
     *
     * @param id Order id
     * @return
     */
    Optional<OrderEntity> queryById(Long id);

    /**
     * delete by id
     *
     * @param id Order id
     * @return
     */
    boolean deleteById(Long id);

}